#正三角
for i in range(1,10):
    for j in range(1,i+1):
        print("{}*{}={}".format(i,j,j*i),end=(" "))
    print("")
print("="*80) 
#倒三角
    
for i in range(9,0,-1):
    for j in range(1,i+1):
        print("{}*{}={}".format(i,j,j*i),end=(" "))
    print("")
print("="*80)         
#反正三角
for i in range(1,10):#输出9行
    for k in range(1,10-i):#填充
        print(end="        ") #判断应该用多少个空格来填充前面的空白
    for j in range(i,0,-1):#输出九九乘法表
        print("{}*{}={:<3}".format(i,j,j*i),end=(" "))
    print("")
print("="*80)    
#反倒三角
for i in range(9,0,-1):
    for k in range(1,10-i):
        print(end="        ")
    for j in range(i,0,-1):
        print("{}*{}={:<3}".format(i,j,j*i),end=(" "))
    print("")
